determine the domain and range from a graph